#ifndef ICOMPONENT_H
#define ICOMPONENT_H

#include <QSharedPointer>

class IComponent
{
public:
    IComponent(const QString &name) : m_name(name), m_running(false) {}
    virtual ~IComponent() {}

    virtual void start(const QString *arg = Q_NULLPTR) = 0;
    virtual void stop() = 0;

    QString name() const { return m_name; }

    bool running() const { return m_running; }
    void setRunning(bool running) { m_running = running; }

private:
    QString m_name;
    bool m_running;
};

typedef QSharedPointer<IComponent> ComponentPtr;

#endif // ICOMPONENT_H
